//
//  CommentCell.m
//  WY
//
//  Created by lanou3g on 16/5/16.
//  Copyright © 2016年 pcc. All rights reserved.
//

#import "CommentCell.h"

@interface CommentCell()
//用户头像
@property (weak, nonatomic) IBOutlet UIButton *iconImage;
//用户名
@property (weak, nonatomic) IBOutlet UILabel *uname;
//点赞
@property (weak, nonatomic) IBOutlet UIButton *supportBtn;
//点赞数
@property (weak, nonatomic) IBOutlet UILabel *supportCount;
//评论内容
@property (weak, nonatomic) IBOutlet UILabel *contentLabel;



@end

@implementation CommentCell

-(void)setModel:(commentModel *)model {
    if (_model != model) {
        _model = model;
    }
}

-(void)layoutSubviews {
    if (![self.model.timg isEqualToString:@""]) {
        [self.iconImage setImage:[UIImage imageNamed:self.model.timg] forState:UIControlStateNormal];
    }else {
        [self.iconImage setImage:[UIImage imageNamed:@"comment_profile_default.png"] forState:UIControlStateNormal];
    }
    
    self.uname.text = self.model.n;
    self.uname.textColor = [UIColor colorWithRed:0.2 green:0.2 blue:0.6 alpha:1.0];
    self.contentLabel.text = self.model.b;
    self.supportCount.text = self.model.v;
    self.supportCount.textColor = [UIColor colorWithRed:0.7 green:0.2 blue:0.1 alpha:1.0];
    
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
